import format from '@dfeidao/atom-web/dt/format';
import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import show from '@dfeidao/atom-web/ui/show';

export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// todo
	const exam_name1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="exam_name"]');
	const exam_score1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="exam_score"]');
	const exam_time1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="exam_time"]');
	const exam_explain1 = fd.data.node.querySelector<HTMLTextAreaElement>('[data-id="exam_explain"]');

	const addtol=fd.data.node.querySelector<HTMLDivElement>('[data-id="show"]');
	set_node_cls(addtol, 'display-n',false);
	show(fd.data.node);
	const start_time = fd.data.node.querySelector<HTMLInputElement>('[data-id="start_time"]');
	const a = new Date();
	const b = a.getTime();
	const time = format(b, 2);
	start_time.value = time;
	const finish_time = fd.data.node.querySelector<HTMLInputElement>('[data-id="finish_time"]');
	let b2 = a.getTime();
	b2 += 3600000;
	const time2 = format(b2, 2);
	finish_time.value = time2;
	// console.log(time2);
	exam_name1.value = "";
	exam_score1.value = "";
	exam_time1.value = "";
	exam_explain1.value = "";
}
